package com.yanliang.servlet;

import com.yanliang.model.Request;
import com.yanliang.model.Response;

/**
 * @author yanliang
 * @date 5/10/20203:14 PM
 */
public abstract class HttpServlet implements Servlet{


	public abstract void doGet(Request request,Response response);

	public abstract void doPost(Request request,Response response);


	@Override
	public void service(Request request, Response response) throws Exception {
		if("GET".equalsIgnoreCase(request.getMethod())) {
			doGet(request,response);
		}else{
			doPost(request,response);
		}
	}
}
